#pragma once

#include <memory>
#include <string>
#include <system_error>

#include "helper/resource/IOpenable.h"
#include "helper/resource/IResource.h"
#include "helper/iter/Iterator.h"

namespace memdb {
namespace impl {


class IMeta : public helper::resource::IOpenable<std::error_code>
					  , public helper::resource::IResource<std::error_code> {
public:
	virtual ~IMeta(){}

public:
	virtual std::error_code insert(const std::string & key, const std::string & value) = 0;
	virtual std::error_code remove(const std::string & key) = 0;
	
	virtual size_t count() const = 0;

	typedef std::pair<const std::string, std::string> * Item;
	virtual std::unique_ptr<helper::iter::Iterator<Item>> iterator() const = 0;
};


}//namespace impl
}//namespace memdb
